package com.icart.entities;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

@Entity
@Table(name = "cu_custinfo", schema = "ams", catalog = "")
public class CuCustinfoEntity {
    private long custid;
    private String custname;
    private String fm;
    private String mobile;
    private String linkman;
    private String linktel;
    private Timestamp creattime;
    private Long creatchn;
    private Long creator;
    private String custlevel;
    private String custkind;
    private String custbirthday;
    private String drivingpermit;
    private Date dpexpirydate;
    private String addrprovice;
    private String addrcity;
    private String addrregion;
    private String addrblock;
    private String addr;
    private String email;
    private String wxid;
    private String income;
    private String idnum;
    private String hobby;
    private Long points;
    private String remark;
    private Long sourceid;

    @Id
    @Column(name = "custid")
    public long getCustid() {
        return custid;
    }

    public void setCustid(long custid) {
        this.custid = custid;
    }

    @Basic
    @Column(name = "custname")
    public String getCustname() {
        return custname;
    }

    public void setCustname(String custname) {
        this.custname = custname;
    }

    @Basic
    @Column(name = "fm")
    public String getFm() {
        return fm;
    }

    public void setFm(String fm) {
        this.fm = fm;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "linkman")
    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    @Basic
    @Column(name = "linktel")
    public String getLinktel() {
        return linktel;
    }

    public void setLinktel(String linktel) {
        this.linktel = linktel;
    }

    @Basic
    @Column(name = "creattime")
    public Timestamp getCreattime() {
        return creattime;
    }

    public void setCreattime(Timestamp creattime) {
        this.creattime = creattime;
    }

    @Basic
    @Column(name = "creatchn")
    public Long getCreatchn() {
        return creatchn;
    }

    public void setCreatchn(Long creatchn) {
        this.creatchn = creatchn;
    }

    @Basic
    @Column(name = "creator")
    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    @Basic
    @Column(name = "custlevel")
    public String getCustlevel() {
        return custlevel;
    }

    public void setCustlevel(String custlevel) {
        this.custlevel = custlevel;
    }

    @Basic
    @Column(name = "custkind")
    public String getCustkind() {
        return custkind;
    }

    public void setCustkind(String custkind) {
        this.custkind = custkind;
    }

    @Basic
    @Column(name = "custbirthday")
    public String getCustbirthday() {
        return custbirthday;
    }

    public void setCustbirthday(String custbirthday) {
        this.custbirthday = custbirthday;
    }

    @Basic
    @Column(name = "drivingpermit")
    public String getDrivingpermit() {
        return drivingpermit;
    }

    public void setDrivingpermit(String drivingpermit) {
        this.drivingpermit = drivingpermit;
    }

    @Basic
    @Column(name = "dpexpirydate")
    public Date getDpexpirydate() {
        return dpexpirydate;
    }

    public void setDpexpirydate(Date dpexpirydate) {
        this.dpexpirydate = dpexpirydate;
    }

    @Basic
    @Column(name = "addrprovice")
    public String getAddrprovice() {
        return addrprovice;
    }

    public void setAddrprovice(String addrprovice) {
        this.addrprovice = addrprovice;
    }

    @Basic
    @Column(name = "addrcity")
    public String getAddrcity() {
        return addrcity;
    }

    public void setAddrcity(String addrcity) {
        this.addrcity = addrcity;
    }

    @Basic
    @Column(name = "addrregion")
    public String getAddrregion() {
        return addrregion;
    }

    public void setAddrregion(String addrregion) {
        this.addrregion = addrregion;
    }

    @Basic
    @Column(name = "addrblock")
    public String getAddrblock() {
        return addrblock;
    }

    public void setAddrblock(String addrblock) {
        this.addrblock = addrblock;
    }

    @Basic
    @Column(name = "addr")
    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "wxid")
    public String getWxid() {
        return wxid;
    }

    public void setWxid(String wxid) {
        this.wxid = wxid;
    }

    @Basic
    @Column(name = "income")
    public String getIncome() {
        return income;
    }

    public void setIncome(String income) {
        this.income = income;
    }

    @Basic
    @Column(name = "idnum")
    public String getIdnum() {
        return idnum;
    }

    public void setIdnum(String idnum) {
        this.idnum = idnum;
    }

    @Basic
    @Column(name = "hobby")
    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    @Basic
    @Column(name = "points")
    public Long getPoints() {
        return points;
    }

    public void setPoints(Long points) {
        this.points = points;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "sourceid")
    public Long getSourceid() {
        return sourceid;
    }

    public void setSourceid(Long sourceid) {
        this.sourceid = sourceid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CuCustinfoEntity that = (CuCustinfoEntity) o;

        if (custid != that.custid) return false;
        if (custname != null ? !custname.equals(that.custname) : that.custname != null) return false;
        if (fm != null ? !fm.equals(that.fm) : that.fm != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (linkman != null ? !linkman.equals(that.linkman) : that.linkman != null) return false;
        if (linktel != null ? !linktel.equals(that.linktel) : that.linktel != null) return false;
        if (creattime != null ? !creattime.equals(that.creattime) : that.creattime != null) return false;
        if (creatchn != null ? !creatchn.equals(that.creatchn) : that.creatchn != null) return false;
        if (creator != null ? !creator.equals(that.creator) : that.creator != null) return false;
        if (custlevel != null ? !custlevel.equals(that.custlevel) : that.custlevel != null) return false;
        if (custkind != null ? !custkind.equals(that.custkind) : that.custkind != null) return false;
        if (custbirthday != null ? !custbirthday.equals(that.custbirthday) : that.custbirthday != null) return false;
        if (drivingpermit != null ? !drivingpermit.equals(that.drivingpermit) : that.drivingpermit != null)
            return false;
        if (dpexpirydate != null ? !dpexpirydate.equals(that.dpexpirydate) : that.dpexpirydate != null) return false;
        if (addrprovice != null ? !addrprovice.equals(that.addrprovice) : that.addrprovice != null) return false;
        if (addrcity != null ? !addrcity.equals(that.addrcity) : that.addrcity != null) return false;
        if (addrregion != null ? !addrregion.equals(that.addrregion) : that.addrregion != null) return false;
        if (addrblock != null ? !addrblock.equals(that.addrblock) : that.addrblock != null) return false;
        if (addr != null ? !addr.equals(that.addr) : that.addr != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (wxid != null ? !wxid.equals(that.wxid) : that.wxid != null) return false;
        if (income != null ? !income.equals(that.income) : that.income != null) return false;
        if (idnum != null ? !idnum.equals(that.idnum) : that.idnum != null) return false;
        if (hobby != null ? !hobby.equals(that.hobby) : that.hobby != null) return false;
        if (points != null ? !points.equals(that.points) : that.points != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (sourceid != null ? !sourceid.equals(that.sourceid) : that.sourceid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (custid ^ (custid >>> 32));
        result = 31 * result + (custname != null ? custname.hashCode() : 0);
        result = 31 * result + (fm != null ? fm.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (linkman != null ? linkman.hashCode() : 0);
        result = 31 * result + (linktel != null ? linktel.hashCode() : 0);
        result = 31 * result + (creattime != null ? creattime.hashCode() : 0);
        result = 31 * result + (creatchn != null ? creatchn.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        result = 31 * result + (custlevel != null ? custlevel.hashCode() : 0);
        result = 31 * result + (custkind != null ? custkind.hashCode() : 0);
        result = 31 * result + (custbirthday != null ? custbirthday.hashCode() : 0);
        result = 31 * result + (drivingpermit != null ? drivingpermit.hashCode() : 0);
        result = 31 * result + (dpexpirydate != null ? dpexpirydate.hashCode() : 0);
        result = 31 * result + (addrprovice != null ? addrprovice.hashCode() : 0);
        result = 31 * result + (addrcity != null ? addrcity.hashCode() : 0);
        result = 31 * result + (addrregion != null ? addrregion.hashCode() : 0);
        result = 31 * result + (addrblock != null ? addrblock.hashCode() : 0);
        result = 31 * result + (addr != null ? addr.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (wxid != null ? wxid.hashCode() : 0);
        result = 31 * result + (income != null ? income.hashCode() : 0);
        result = 31 * result + (idnum != null ? idnum.hashCode() : 0);
        result = 31 * result + (hobby != null ? hobby.hashCode() : 0);
        result = 31 * result + (points != null ? points.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (sourceid != null ? sourceid.hashCode() : 0);
        return result;
    }
}
